Skip to content

feat: fail fast when DOCKER_HOST points to an external daemon (workflow-scope DinD) - #1909

Merged
lpcox merged 4 commits into
mainfrom
copilot/fix-dind-container-networking
Apr 11, 2026
Merged

lpcox merged 4 commits into
mainfrom
copilot/fix-dind-container-networking

Conversation

Copilot AI commented Apr 11, 2026 •

Copy link
Copy Markdown
Contributor

Workflow-scope DinD (DOCKER_HOST=tcp://localhost:2375) silently breaks AWF because Docker Compose routes container creation through the DinD daemon's network namespace, where AWF's fixed subnet (172.30.0.0/24) and iptables DNAT rules are unreachable from the runner.

Changes

  • Fail-fast check (src/cli.ts): checkDockerHost() inspects DOCKER_HOST at startup. Any value other than the two canonical local sockets (unix:///var/run/docker.sock, unix:///run/docker.sock) exits immediately with a clear error:

    ❌ DOCKER_HOST is set to an external daemon (tcp://localhost:2375). AWF requires the
    local Docker daemon (default socket). Workflow-scope DinD is incompatible with AWF's
    network isolation model. See the "Workflow-Scope DinD Incompatibility" section in
    docs/usage.md for details and workarounds.
    
  • Documentation (docs/usage.md): New Workflow-Scope DinD Incompatibility subsection under Limitations — explains root cause, the error message, and the --enable-dind workaround for agents that genuinely need Docker access.

  • Tests (src/cli.test.ts): 7 unit tests for checkDockerHost() covering absent/undefined env var, both valid local socket paths, TCP, TLS TCP, and non-standard unix socket.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[awf] docker-manager: workflow-scope DinD (DOCKER_HOST) breaks AWF container networking

3 participants